#pragma once
/*
A-C Terminal
Klampen borg
90
*/
// CSplash dialog
#include "CButtonST\BtnST.h"

class CExDialog : public CDialog
{
	DECLARE_DYNAMIC(CExDialog)

public:
	CExDialog(UINT nIDTemplate, CWnd* pParent = NULL, int BkBitmapId = 0);   // standard constructor
	virtual ~CExDialog();

	virtual void OnFinalRelease();

protected:
    CDC * m_pMemBkDC;
    CBitmap * m_pBkBtmp;
    int m_BkBtmpId;
    void FreeRes(void);

	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

public:
    virtual BOOL OnInitDialog();
public:
    DECLARE_MESSAGE_MAP()
public:
    afx_msg BOOL OnEraseBkgnd(CDC* pDC);
    afx_msg LRESULT OnGetDefID(WPARAM wp, LPARAM lp) ;
public:
    virtual BOOL PreTranslateMessage(MSG* pMsg);
};


typedef enum te_tm_id
{
    ID_TM_START_UP = 1001,
    TM_ID_SPASH,
    ID_TM_SHOW,
    TM_TOTALS
}TM_ID;

#include "Protocol.h"


class CSplash : public CExDialog
{
	DECLARE_DYNAMIC(CSplash)
    NOTIFYICONDATA m_SysTrayInd;
    BOOL           m_IsNotify;
    INT            m_ConnStatus;
    CProtocol      m_protocol;

public:
    CButtonST  m_btn_Restore, m_btn_Upload, m_btn_exit, m_btn_Continue, m_btn_Statu;
    BOOL   m_bExit ;
	CSplash(CWnd* pParent = NULL);   // standard constructor
	virtual ~CSplash();

	virtual void OnFinalRelease();
    void InitSysTray(void)  ;
    int  SetSysTrayInfo(EM_TRAY_STATUS tray_statu, BOOL bShowTrayInfo=1);
    int  SetSysTrayIcon(int IconId);
    void GetItemRect(CRect &r, int CtrlId);

// Dialog Data
	enum { IDD = IDD_DLG_SPLASH };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
    virtual BOOL OnInitDialog();
public:
    afx_msg void OnTimer(UINT_PTR nIDEvent);
public:
    afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
public:
    afx_msg void OnBnClickedBtnExit();
public:
    afx_msg void OnDestroy();
public:
    afx_msg LRESULT onShowTask(WPARAM wParam,LPARAM lParam);
public:
    afx_msg void OnBnClickedBtnNext();
public:
    afx_msg void OnBnClickedBtnUpload();
public:
    afx_msg void OnBnClickedBtnRestore();
public:
    afx_msg void OnWindow();
public:
    afx_msg void OnPaint();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
};

